<template>
	<view>
		<view class="data-box">
			<view class="cu-bar bg-white">
				<view class="action data-box-title">
					<text class="cuIcon-titles"></text> 私车公用
				</view>
			</view>
			<view class="form-block">
				<view class="card">
					<view class="card-body">
						<u--form
						class="from-card"
						labelPosition="left"
						labelWidth="80"
						:model="info">
							<u-form-item
							label="报销人"
							prop="userName"
							borderBottom>
								<u--input
								disabled
								disabledColor="#ffffff"
								v-model="info.userName"
								inputAlign="right"
								border="none">
								</u--input>
							</u-form-item>
							<u-form-item
							label="里程照片"
							prop="images"
							borderBottom>
								<u-upload
									:disabled="true"
									:deletable="false"
									maxCount="3"
									:fileList="images">
								</u-upload>
							</u-form-item>
							<u-form-item
							label="总里程(km)"
							prop="mileage"
							labelWidth="100"
							borderBottom>
								<u--input
								disabled
								disabledColor="#ffffff"
								v-model="info.mileage"
								inputAlign="right"
								border="none">
								</u--input>
							</u-form-item>
							<u-form-item label="报销金额(元)" labelWidth="100" prop="amount" borderBottom>
								<u--input
								disabled
								disabledColor="#ffffff"
								v-model="info.amount"
								inputAlign="right"
								border="none"
								></u--input>
							</u-form-item>
							<u-form-item label="任务日期" prop="time" borderBottom>
								<u--input
								disabled
								disabledColor="#ffffff"
								v-model="info.time"
								inputAlign="right"
								border="none"
								></u--input>
							</u-form-item>
							<u-form-item label="任务内容" prop="content">
								<u--textarea
								disabled
								disabledColor="#ffffff"
								v-model="info.content" >
								</u--textarea>
							</u-form-item>
						</u--form>
					</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import { getInfo } from '@/api/privatecar.js'
	export default {
		data() {
			return {
				info:{},
				images:[],
			}
		},
		onLoad(option) {
			this.getManInfo(option.id)
		},
		methods: {
			async getManInfo(id){
				const { data } = await getInfo(id);
				if(data.code == 200){
					this.info = data.data
					data.data.images.split(',').map(e=>{
						this.images.push({url:e})
					})
				}
			},
		}
	}
</script>

<style>
	page{
		background-color: #f6f6f6;
		color: #333333;
	}
	
</style>